package design.a3_prototype;

public class People implements Cloneable {

	private String name;

	private int id;

	private String type;

	public People(String name, int id, String type) {
		this.name = name;
		this.id = id;
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Object clone() throws CloneNotSupportedException {
		System.out.println("克隆成功");
		return (People) super.clone();
	}

	@Override
	public String toString() {
		return "People{" +
				"name='" + name + '\'' +
				", id=" + id +
				", type='" + type + '\'' +
				'}';
	}
}
